﻿namespace Cpuss
{
    /// <summary>
    /// Event data associated with <see cref="Process.Started"/>.
    /// </summary>
    public class ProcessStartedEventArgs : ProcessEventArgs
    {
        private readonly int _startTime;

        /// <summary>
        /// Initializes a new instance of <see cref="ProcessStartedEventArgs"/>.
        /// </summary>
        /// <param name="id">PID.</param>
        /// <param name="burstTime">Burst time of process.</param>
        /// <param name="arrivalTime">Arrival time of process.</param>
        /// <param name="priority">Priority of process.</param>
        /// <param name="startTime">Start time of process.</param>
        public ProcessStartedEventArgs(int id, int burstTime, int arrivalTime, Priority priority, int startTime)
            : base(id, burstTime, arrivalTime, priority)
        {
            _startTime = startTime;
        }

        /// <summary>
        /// Gets time when the process utilized the CPU for the first time.
        /// </summary>
        public int StartTime
        {
            get { return _startTime; }
        }
    }
}